﻿<%@ Page Language="C#" MasterPageFile="~/Pages/MainPage.Master" AutoEventWireup="true" CodeBehind="CreateContractor.aspx.cs" Inherits="ContractManagermentSystem.Pages.CreateContractor" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="body" runat="server">
    <h1 style="font-family: Vivaldi">
        Create new contractor</h1>
    <table align="center" cellpadding="5" cellspacing="5">
        <tr>
            <td>
                Username:
            </td>
            <td>
                <asp:TextBox ID="UserName" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="CheckNullUserName" runat="server" ControlToValidate="UserName"
                    ForeColor="red" Font-Bold="True" Display="Dynamic" ErrorMessage="Tên tài khoản ko được để trống!"
                    ValidationGroup="Check"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
                Password:
            </td>
            <td>
                <asp:TextBox ID="Password" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="CheckNullPassword" runat="server" ControlToValidate="Password"
                    ForeColor="red" Font-Bold="True" Display="Dynamic" ErrorMessage="Password ko được để trống!"
                    ValidationGroup="Check"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
                Full Name:
            </td>
            <td>
                <asp:TextBox ID="FullName" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="CheckNullName" runat="server" ControlToValidate="FullName"
                    Display="Dynamic" ErrorMessage="Tên ko được để trống!" ValidationGroup="Check"
                    ForeColor="red" Font-Bold="True"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="CheckNameCharacter" runat="server" ControlToValidate="FullName"
                    ForeColor="red" Font-Bold="True" Display="Dynamic" ErrorMessage="Tên bạn nhập ko hợp lệ!"
                    ValidationExpression="[a-z A-Z]+" ValidationGroup="Check"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                Phone number 1:
            </td>
            <td>
                <asp:TextBox ID="PhoneNumber1" runat="server"></asp:TextBox>
            </td>
            <td>
            <asp:RequiredFieldValidator ID="CheckNullPhoneNumber1" runat="server" ControlToValidate="PhoneNumber1"
                    Display="Dynamic" ErrorMessage="Phone Number 1 ko được để trống!" ValidationGroup="Check"
                    ForeColor="red" Font-Bold="True"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="CheckPhoneNumber1Character" runat="server" ControlToValidate="PhoneNumber1"
                    ForeColor="red" Font-Bold="True" Display="Dynamic" ErrorMessage="Phone Number 1 ko hợp lệ!"
                    ValidationExpression="[0-9]+" ValidationGroup="Check"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                Phone number 2:
            </td>
            <td>
                <asp:TextBox ID="PhoneNumber2" runat="server"></asp:TextBox>
            </td>
            <td>
            <asp:RequiredFieldValidator ID="CheckNullPhoneNumber2" runat="server" ControlToValidate="PhoneNumber2"
                    Display="Dynamic" ErrorMessage="Phone Number 2 ko được để trống!" ValidationGroup="Check"
                    ForeColor="red" Font-Bold="True"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="CheckPhoneNumber2Character" runat="server" ControlToValidate="PhoneNumber2"
                    ForeColor="red" Font-Bold="True" Display="Dynamic" ErrorMessage="Phone Number 2 ko hợp lệ!"
                    ValidationExpression="[0-9]+" ValidationGroup="Check"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                Gender:
            </td>
            <td>
                <asp:DropDownList ID="Gender" runat="server">
                    <asp:ListItem>Male</asp:ListItem>
                    <asp:ListItem>Female</asp:ListItem>
                    <asp:ListItem>Other</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td>
                IsActive:
            </td>
            <td>
                <asp:CheckBox ID="IsActive" runat="server" Text="Active"></asp:CheckBox>
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td>
                Branch:
            </td>
            <td>
                <asp:TextBox ID="Branch" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="CheckNullBranch" runat="server" ControlToValidate="Branch"
                    Display="Dynamic" ErrorMessage="Branch ko được để trống!" ValidationGroup="Check"
                    ForeColor="red" Font-Bold="True"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="CheckBranchCharacter" runat="server" ControlToValidate="Branch"
                    ForeColor="red" Font-Bold="True" Display="Dynamic" ErrorMessage="Tên Branch ko hợp lệ!"
                    ValidationExpression="[a-z A-Z 0-9]+" ValidationGroup="Check"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
                Sort Code:
            </td>
            <td>
                <asp:TextBox ID="SortCode" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="CheckNullSortCode" runat="server" ControlToValidate="SortCode"
                    Display="Dynamic" ErrorMessage="Sort Code ko được để trống!" ValidationGroup="Check"
                    ForeColor="red" Font-Bold="True"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="CheckSortCodeCharacter" runat="server" ControlToValidate="SortCode"
                    ForeColor="red" Font-Bold="True" Display="Dynamic" ErrorMessage="Sort Code ko hợp lệ!"
                    ValidationExpression="[a-z A-Z 0-9]+" ValidationGroup="Check"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td colspan="2" style="text-align: center">
                <asp:Button ID="CreateButton" runat="server" Text="Create" OnClick="CreateButtonClick"
                    ValidationGroup="Check" />
                <asp:Button ID="ResetButton" runat="server" Text="Reset" OnClick="ResetButtonClick" />
            </td>
        </tr>
    </table>
</asp:Content>

